<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>satstress.satstress</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="satstress-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/satstress">satstress</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="satstress-module.html">Package&nbsp;satstress</a> ::
        Module&nbsp;satstress
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="satstress.satstress-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module satstress</h1><p class="nomargin-top"><span class="codelink"><a href="satstress.satstress-pysrc.html">source&nbsp;code</a></span></p>
<p>A framework for calculating the surface stresses at a particular place
  and time on a satellite resulting from one or more tidal potentials.</p>
  <h1 class="heading">1 Input and Output</h1>
    <p>Because <code>satstress</code> is a &quot;library&quot; module, it 
    doesn't do a lot of input and output - it's mostly about doing 
    calculations.  It does need to read in the specification of a <a 
    href="satstress.satstress.Satellite-class.html" 
    class="link">Satellite</a> object though, and it can write the same 
    kind of specification out.  To do this, it uses name-value files, and a
    function called <a href="satstress.satstress-module.html#nvf2dict" 
    class="link">nvf2dict</a>, which creates a Python dictionary (or 
    &quot;associative array&quot;).</p>
    <p>A name-value file is just a file containing a bunch of name-value 
    pairs, like:</p>
<pre class="literalblock">
 ORBIT_ECCENTRICITY = 0.0094   # e must be &lt; 0.25
</pre>
    <p>It can also contain comments to enhance human readability (anything 
    following a '#' on a line is ignored, as with the note in the line 
    above).</p>
  <h1 class="heading">2 Satellites</h1>
    <p>Obviously if we want to calculate the stresses on the surface of a 
    satellite, we need to define the satellite, this is what the <a 
    href="satstress.satstress.Satellite-class.html" 
    class="link">Satellite</a> object does.</p>
    <h2 class="heading">2.1 Specifying a Satellite</h2>
      <p>In order to specify a satellite, we need:</p>
      <ul>
        <li>
          an ID of some kind for the planet/satellite pair of interest
        </li>
        <li>
          the charactaristics of the satellite's orbital environment
        </li>
        <li>
          the satellite's internal structure and material properties
        </li>
        <li>
          the forcings to which the satellite is subjected
        </li>
      </ul>
      <p>From a few basic inputs, we can calculate many derived 
      characteristics, such as the satellite's orbital period or the 
      surface gravity.</p>
      <p>The internal structure and material properties are specified by a 
      series of concentric spherical shells (layers), each one being 
      homogeneous throughout its extent.  Given the densities and 
      thicknesses of the these layers, we can calculate the satellite's 
      overall size, mass, density, etc.</p>
      <p>Specifying a tidal forcing may be simple or complex.  For 
      instance, the <a href="satstress.satstress.Diurnal-class.html" 
      class="link">Diurnal</a> forcing depends only on the orbital 
      eccentricity (and other orbital parameters already supplied), and the
      <a href="satstress.satstress.NSR-class.html" class="link">NSR</a> 
      forcing requires only the addition of the non-synchronous rotation 
      period of the shell.  Specifying an arbitrary true polar wander 
      trajectory would be much more complex.</p>
      <p>For the moment, becuase we are only including simple forcings, 
      their specifying parameters are read in from the satellite definition
      file.  If more, and more complex forcings are eventually added to the
      model, their specification will probably be split into a separate 
      input file.</p>
    <h2 class="heading">2.2 Internal Structure and Love Numbers</h2>
      <p><code>satstress</code> treats the solid portions of the satellite 
      as <a href="http://en.wikipedia.org/wiki/Maxwell_material" 
      target="_top">viscoelastic Maxwell solids</a>, that respond 
      differently to forcings having different frequencies (&omega;).  
      Given the a specification of the internal structure and material 
      properties of a satellite as a series of layers, and information 
      about the tidal forcings the body is subject to, it's possible to 
      calculate appropriate Love numbers, which describe how the body 
      responds to a change in the gravitational potential.</p>
      <p>Currently the calculation of Love numbers is done by an external 
      program written in Fortran by John Wahr and others, with roots 
      reaching deep into the Dark Ages of computing.  As that code (or 
      another Love number code) is more closely integrated with the model, 
      the internal structure of the satellite will become more flexible, 
      but for the moment, we are limited to assuming a 4-layer 
      structure:</p>
      <ul>
        <li>
          <b><code>ICE_UPPER</code></b>: The upper portion of the shell 
          (cooler, stiffer)
        </li>
        <li>
          <b><code>ICE_LOWER</code></b>: The lower portion of the shell 
          (warmer, softer)
        </li>
        <li>
          <b><code>OCEAN</code></b>: An inviscid fluid decoupling the shell
          from the core.
        </li>
        <li>
          <b><code>CORE</code></b>: The silicate interior of the body.
        </li>
      </ul>
  <h1 class="heading">3 Stresses</h1>
    <p><code>satstress</code> can calculate the following stress 
    fields:</p>
    <ol start="1">
      <li>
        <b><a href="satstress.satstress.Diurnal-class.html" 
        class="link">Diurnal</a></b>: stresses arising from an eccentric 
        orbit, having a forcing frequency equal to the orbital frequency.
      </li>
      <li>
        <b><a href="satstress.satstress.NSR-class.html" 
        class="link">NSR</a></b>: stresses arising due to the 
        faster-than-synchronous rotation of a floating shell that is 
        decoupled from the satellite's interior by a fluid layer (an 
        ocean).
      </li>
    </ol>
    <p>The expressions defining these stress fields are derived in 
    &quot;Modeling Stresses on Satellites due to Non-Synchronous Rotation 
    and Orbital Eccentricity Using Gravitational Potential Theory&quot; (<a
    href="http://satstress.googlecode.com/files/Wahretal2008.pdf" 
    target="_top">preprint, 15MB PDF</a>) by Wahr et al. (submitted to 
    <i>Icarus</i>, in March, 2008).</p>
    <h2 class="heading">3.1 Stress Fields Live in <a href="satstress.satstress.StressDef-class.html" class="link">StressDef</a> Objects</h2>
      <p>Each of the above stress fields is defined by a similarly named <a
      href="satstress.satstress.StressDef-class.html" 
      class="link">StressDef</a> object.  These objects contain the 
      formulae necessary to calculate the surface stress.  The expressions 
      for the stresses depend on many parameters which are defined within 
      the <a href="satstress.satstress.Satellite-class.html" 
      class="link">Satellite</a> object, and so to create a <a 
      href="satstress.satstress.StressDef-class.html" 
      class="link">StressDef</a> object, you need to provide a <a 
      href="satstress.satstress.Satellite-class.html" 
      class="link">Satellite</a> object.</p>
      <p>There are many formulae which are identical for both the <a 
      href="satstress.satstress.NSR-class.html" class="link">NSR</a> and <a
      href="satstress.satstress.Diurnal-class.html" 
      class="link">Diurnal</a> stress fields, and so instead of duplicating
      them in both classes, they reside in the <a 
      href="satstress.satstress.StressDef-class.html" 
      class="link">StressDef</a> <i>base class</i>, from which all <a 
      href="satstress.satstress.StressDef-class.html" 
      class="link">StressDef</a> objects inherit many properties.</p>
      <p>The main requirement for each <a 
      href="satstress.satstress.StressDef-class.html" 
      class="link">StressDef</a> object is that it must define the three 
      components of the stress tensor &tau;:</p>
      <ul>
        <li>
          <code>Ttt</code> (&tau;_&theta;&theta;) the north-south 
          (latitudinal) component
        </li>
        <li>
          <code>Tpt</code> (&tau;_&phi;&theta; = &tau;_&theta;&phi;) the 
          shear component
        </li>
        <li>
          <code>Tpp</code> (&tau;_&phi;&phi;) the east-west (longitudinal) 
          component
        </li>
      </ul>
    <h2 class="heading">3.2 Stress Calculations are Performed by <a href="satstress.satstress.StressCalc-class.html" class="link">StressCalc</a> Objects</h2>
      <p>Once you've <i>instantiated</i> a <a 
      href="satstress.satstress.StressDef-class.html" 
      class="link">StressDef</a> object, or several of them (one for each 
      stress you want to include), you can compose them together into a <a 
      href="satstress.satstress.StressCalc-class.html" 
      class="link">StressCalc</a> object, which will actually do 
      calculations at given points on the surface, and given times, and 
      return a 2x2 matrix containing the resulting stress tensor (each 
      component of which is the sum of all of the corresponding components 
      of the stress fields that were used to instantiated the <a 
      href="satstress.satstress.StressCalc-class.html" 
      class="link">StressCalc</a> object).</p>
      <p>This is (hopefully) easier than it sounds.  With the following few
      lines, you can construct a satellite, do a single calculation on its 
      surface, and see what it looks like:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> satstress.satstress <span class="py-keyword">import</span> *
<span class="py-prompt">&gt;&gt;&gt; </span>the_sat = Satellite(open(<span class="py-string">&quot;input/Europa.satellite&quot;</span>))
<span class="py-prompt">&gt;&gt;&gt; </span>the_stresses = StressCalc([Diurnal(the_sat), NSR(the_sat)])
<span class="py-prompt">&gt;&gt;&gt; </span>Tau = the_stresses.tensor(theta=pi/4.0, phi=pi/3.0, t=10000)
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(Tau)</pre>
      <p>The <code>test</code> program included in the satstress 
      distribution shows a slightly more complex example, which should be 
      enough to get you started using the package.</p>
    <h2 class="heading">3.3 Extending the Model</h2>
      <p>Other stress fields can (and hopefully will!), be added easily, so
      long as they use the same mathematical definition of the membrane 
      stress tensor (&tau;), as a function of co-latitude (&theta;) 
      (measured south from the north pole), east-positive longitude 
      (&phi;), measured from the meridian on the satellite which passes 
      through the point on the satellite directly beneath the parent planet
      (assuming a synchronously rotating satellite), and time (<b><i 
      class="math">t</i></b>), defined as seconds elapsed since 
      pericenter.</p>
      <p>This module could also potentially be extended to also calculate 
      the surface strain (&epsilon;) and displacement (<b><i 
      class="math">s</i></b>) fields, or to calculate the stresses at any 
      point within the satellite.</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Classes</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.Satellite-class.html" class="summary-name">Satellite</a><br />
      An object describing the physical structure and context of a 
        satellite.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.SatLayer-class.html" class="summary-name">SatLayer</a><br />
      An object describing a uniform material layer within a satellite.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.LoveNum-class.html" class="summary-name">LoveNum</a><br />
      A container class for the complex Love numbers: h2, k2, and l2.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.StressDef-class.html" class="summary-name">StressDef</a><br />
      A base class from which particular tidal stress field objects 
        descend.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.NSR-class.html" class="summary-name">NSR</a><br />
      An object defining the stress field which arises from the 
        non-synchronous rotation (NSR) of a satellite's icy shell.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.Diurnal-class.html" class="summary-name">Diurnal</a><br />
      An object defining the stress field that arises on a satellite due 
        to an eccentric orbit.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.StressCalc-class.html" class="summary-name">StressCalc</a><br />
      An object which calculates the stresses on the surface of a <a 
        href="satstress.satstress.Satellite-class.html" 
        class="link">Satellite</a> that result from one or more stress 
        fields.
    </td>
  </tr>
<tr bgcolor="#e8f0f8" >
  <th colspan="2" class="group-header"
    >&nbsp;&nbsp;&nbsp;&nbsp;Exceptions (error handling classes)</th></tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.Error-class.html" class="summary-name">Error</a><br />
      Base class for errors within the satstress module.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.NameValueFileError-class.html" class="summary-name">NameValueFileError</a><br />
      Base class for errors related to NAME=VALUE style input files.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.NameValueFileParseError-class.html" class="summary-name">NameValueFileParseError</a><br />
      Indicates a poorly formatted NAME=VALUE files.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.NameValueFileDuplicateNameError-class.html" class="summary-name">NameValueFileDuplicateNameError</a><br />
      Indicates multiple copies of the same name in an input file.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.SatelliteParamError-class.html" class="summary-name">SatelliteParamError</a><br />
      Indicates a problem with the Satellite initialization.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.MissingSatelliteParamError-class.html" class="summary-name">MissingSatelliteParamError</a><br />
      Indicates a required parameter was not found in the input file.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.InvalidSatelliteParamError-class.html" class="summary-name">InvalidSatelliteParamError</a><br />
      Raised when a required parameter is not found in the input file.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.LargeEccentricityError-class.html" class="summary-name">LargeEccentricityError</a><br />
      Raised when satellite orbital eccentricity is &gt; 0.25
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.NegativeNSRPeriodError-class.html" class="summary-name">NegativeNSRPeriodError</a><br />
      Raised if the satellite's NSR period is less than zero
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.ExcessiveSatelliteMassError-class.html" class="summary-name">ExcessiveSatelliteMassError</a><br />
      Raised if the satellite's parent planet is less than 10x as massive
        as the satellite.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.LoveLayerNumberError-class.html" class="summary-name">LoveLayerNumberError</a><br />
      Raised if the number of layers specified in the satellite 
        definition file is incompatible with the Love number code.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.InvalidLoveNumberError-class.html" class="summary-name">InvalidLoveNumberError</a><br />
      Raised if the Love numbers are found to be suspicious.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.LoveExcessiveDeltaError-class.html" class="summary-name">LoveExcessiveDeltaError</a><br />
      Raised when &Delta; &gt; 10^9 for any of the ice layers, at which 
        point the Love number code becomes unreliable.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.GravitationallyUnstableSatelliteError-class.html" class="summary-name">GravitationallyUnstableSatelliteError</a><br />
      Raised if the density of layers is found not to decrease as you 
        move toward the surface from the center of the satellite.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.NonNumberSatelliteParamError-class.html" class="summary-name">NonNumberSatelliteParamError</a><br />
      Indicates that a non-numeric value was found for a numerical 
        parameter.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.LowLayerDensityError-class.html" class="summary-name">LowLayerDensityError</a><br />
      Indicates that a layer has been assigned an unrealistically low 
        density.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.LowLayerThicknessError-class.html" class="summary-name">LowLayerThicknessError</a><br />
      Indicates that a layer has been given too small of a thickness
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="satstress.satstress.NegativeLayerParamError-class.html" class="summary-name">NegativeLayerParamError</a><br />
      Indicates a layer has been given an unphysical material property.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Functions</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">dict</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="satstress.satstress-module.html#nvf2dict" class="summary-sig-name">nvf2dict</a>(<span class="summary-sig-arg">nvf</span>,
        <span class="summary-sig-arg">comment</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">#</code><code class="variable-quote">'</code></span>)</span><br />
      Reads from a file object listing name value pairs, creating and 
      returning a corresponding Python dictionary.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="satstress.satstress-pysrc.html#nvf2dict">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="nvf2dict"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">nvf2dict</span>(<span class="sig-arg">nvf</span>,
        <span class="sig-arg">comment</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">#</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="satstress.satstress-pysrc.html#nvf2dict">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Reads from a file object listing name value pairs, creating and 
  returning a corresponding Python dictionary.</p>
  <p>The file should contain a series of name value pairs, one per line 
  separated by the '=' character, with names on the left and values on the 
  right.  Blank lines are ignored, as are lines beginning with the comment 
  character (assumed to be the pound or hash character '#', unless 
  otherwise specified).  End of line comments are also allowed.  String 
  values should not be quoted in the file.  Names are case sensitive.</p>
  <p>Returns a Python dictionary that uses the names as keys and the values
  as values, and so all Python limitations on what can be used as a 
  dictionary key apply to the name fields.</p>
  <p>Leading and trailing whitespace is stripped from all names and values,
  and all values are returned as strings.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>nvf</code></strong> (file) - an open file object from which to read the name value pairs</li>
        <li><strong class="pname"><code>comment</code></strong> (str) - character which begins comments</li>
    </ul></dd>
    <dt>Returns: dict</dt>
        <dd>a dictionary containing the name value pairs read in from 
          <code>nvf</code>.</dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="satstress.satstress.NameValueFileParseError-class.html">NameValueFileParseError</a></strong></code> - if a non-comment input line does not contain an '=' character, or 
        if a non-comment line has nothing but whitespace preceeding or 
        following the '=' character.</li>
        <li><code><strong class='fraise'><a href="satstress.satstress.NameValueFileDuplicateNameError-class.html">NameValueFileDuplicateNameError</a></strong></code> - if more than one instance of the same name is found in the input 
        file <code>nvf</code>.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="satstress-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/satstress">satstress</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Apr  7 20:41:00 2008
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
